import http from '@/common/http.js'

export async function registerUser(data) { //注册用户
	return await http({
		url: '/encounter/user/register',
		method: 'POST',
		data: data
	})
}

export async function checkRegister(data) { //查询用户是否注册
	return await http({
		url: '/encounter/user/checkRegister',
		method: 'GET',
		data: data
	})
}

export async function updateUser(data) { //更新用户
	return await http({
		url: '/encounter/user/update',
		method: 'POST',
		data: data
	})
}

export async function getTagList(data) { //获取标签列表
	return await http({
		url: '/encounter/tag/getList',
		method: 'POST',
		data: data
	})
}

export async function idCardOCR(data) { //身份证ocr识别
	return await http({
		url: '/wx/idCardOCR',
		method: 'POST',
		data: data
	})
}

export async function recommendUserList(data) { //推荐用户列表
	return await http({
		url: '/encounter/user/RecommendUserList',
		method: 'GET',
		data: data
	})
}

export async function saveUserFilter(data) { //新增更新推荐筛选条件
	return await http({
		url: '/encounter/user/saveUserFilter',
		method: 'POST',
		data: data
	})
}

export async function deleteUserFilter(data) { //新增更新推荐筛选条件
	return await http({
		url: '/encounter/user/deleteUserFilter',
		method: 'POST',
		data: data
	})
}

export async function getUserFilter(data) { //推荐用户筛选标签
	return await http({
		url: '/encounter/user/getUserFilter',
		method: 'GET',
		data: data
	})
}

export async function getPersonInfo(data) { //获得个人信息
	return await http({
		url: '/encounter/user/getInfo',
		method: 'GET',
		data: data
	})
}
export async function getActInfo(data) { //获得活动详情
	return await http({
		url: '/encounter/act/'+data.id,
		method: 'GET'
	})
}
export async function subComplaint(data) { //投诉举报
	return await http({
		url: '/encounter/user/subComplaint',
		method: 'POST',
		data: data
	})
}

export async function updateUserLike(data) { //新增/取消喜欢
	return await http({
		url: '/encounter/user/updateUserLike',
		method: 'POST',
		data: data
	})
}

export async function getMutualLikeList(data) { //互相喜欢列表
	return await http({
		url: '/encounter/user/getMutualLikeList',
		method: 'get',
		data: data
	})
}

export async function complaintList(data) { //投诉列表
	return await http({
		url: '/encounter/user/complaintList',
		method: 'GET',
		data: data
	})
}
export async function complaintDetail(data) { //投诉详情
	return await http({
		url: '/encounter/user/complaintDetail',
		method: 'GET',
		data: data
	})
}


export async function userLikeList(data) { //喜欢列表
	return await http({
		url: '/encounter/user/getUserLikeList',
		method: 'GET',
		data: data
	})
}

export async function actList(data) { //查询活动列表
	return await http({
		url: '/encounter/act/list',
		method: 'GET',
		data: data
	})
}

export async function actListUser(data) { //查询活动列表
	return await http({
		url: '/encounter/act/list/user',
		method: 'GET',
		data: data
	})
}

export async function getOrgByInviteCode(data) { //根据邀请码查询组织
	return await http({
		url: '/encounter/org/getByInviteCode/'+data.code,
		method: 'GET'
	})
}
export async function applyOrg(data) { //用户申请组织
	return await http({
		url: '/encounter/review/apply',
		method: 'POST',
		data: data
	})
}
export async function applyAct(data) { //用户申请活动
	return await http({
		url: '/encounter/org/act/apply',
		method: 'POST',
		data: data
	})
}
export async function getUserActStatus(data) { //获取报名状态
	return await http({
		url: '/encounter/org/act/actStatus',
		method: 'POST',
		data: data
	})
}

export async function getForumDetail(data) { //获取论坛帖子详情
	return await http({
		url: '/encounter/forum/detail/' + data.id,
		method: 'GET'
	})
}

export async function getOrgLogByUid(data) { //根据邀请码查询组织
	return await http({
		url: '/encounter/org/getMyOrg/'+data.userId,
		method: 'GET'
	})
}

export async function publishForum(data) { //发布论坛帖子
	return await http({
		url: '/encounter/forum/publish',
		method: 'POST',
		data: data
	})
}

export async function likePost(data) { //点赞/取消点赞帖子
	return await http({
		url: '/encounter/forum/like',
		method: 'POST',
		data: data
	})
}

export async function getCommentList(data) { //获取评论列表
	return await http({
		url: '/encounter/forum/comments',
		method: 'GET',
		data: data
	})
}

export async function addComment(data) { //添加评论
	return await http({
		url: '/encounter/forum/comment/add',
		method: 'POST',
		data: data
	})
}

export async function saveActFilter(data) { //保存活动筛选条件
	return await http({
		url: '/encounter/filter/save',
		method: 'POST',
		data: data
	})
}

export async function deleteActFilter(id) { //删除筛选条件
	return await http({
		url: `/encounter/filter/${id}`,
		method: 'DELETE',
	})
}

export async function myActFilter(userId) { //我的搜索规则
	return await http({
		url: `/encounter/filter/my-filter/${userId}`,
		method: 'GET',
	})
}

export async function myJoinAct(data) { //查询我参加的活动
	return await http({
		url: `/encounter/act/myJoinAct/user`,
		method: 'GET',
		data
	})
}
export async function myPublishAct(data) { //查询我创建的活动
	return await http({
		url: `/encounter/act/myPublishAct/user`,
		method: 'GET',
		data
	})
}
export async function addAct(data) { //创建活动
	return await http({
		url: '/encounter/act',
		method: 'POST',
		data: data
	})
}
export async function getActTagList(data) { //活动类型标签
	return await http({
		url: '/encounter/tag/getList',
		method: 'POST',
		data: data
	})
}
export async function getActUsers(data) { //获得活动审核人员
	return await http({
		url: '/encounter/org/act/users/'+data.id+'/'+data.status,
		method: 'GET'
	})
}
export async function reviewActUser(data) { //活动用户审核
	return await http({
		url: '/encounter/org/act/review',
		method: 'POST',
		data: data
	})
}
export async function getOrgUsers(data) { //获取企业用户列表
	return await http({
		url: '/encounter/org/getUsers/' + data.id,
		method: 'GET'
	})
}
export async function quitOrg(data) { //小程序用户退出组织
	return await http({
		url: '/encounter/org/exitOrg/' + data.userId,
		method: 'PUT'
	})
}
export async function getVlogList(data) { //获得子分类下列表
	return await http({
		url: '/vlog/dynamic/getPage',
		method: 'GET',
		data
	})
}
